{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {},
   "outputs": [],
   "source": [
    "from poe_api_wrapper import PoeExample, PoeApi\n",
    "import numpy as np \n",
    "import os \n",
    "\n",
    "POE_TOKEN = \"P4huHhvuKomylIigs5aQ6w%3D%3D\"\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "metadata": {},
   "outputs": [
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "2023-11-14 16:02:23.967 | WARNING  | poe_api_wrapper.api:on_ws_close:302 - Connection to remote host was lost. Reconnecting...\n"
     ]
    }
   ],
   "source": [
    "token = POE_TOKEN\n",
    "client = PoeApi(token)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "{'beaver': [{'chatId': 177791042, 'chatCode': '2pdq7mlsrtou6rlpxnd', 'id': 'Q2hhdDoxNzc3OTEwNDI=', 'title': 'Refactor Script'}, {'chatId': 176119234, 'chatCode': '2q0yjpl6fn5uapefys6', 'id': 'Q2hhdDoxNzYxMTkyMzQ=', 'title': 'Code Evaluation'}], 'a2_2': [{'chatId': 177795535, 'chatCode': '2pdpuooinc3ivuc3pzc', 'id': 'Q2hhdDoxNzc3OTU1MzU=', 'title': 'Refactor Ros Bag'}, {'chatId': 175001986, 'chatCode': '2q3k3sdfhlfcrsp0fla', 'id': 'Q2hhdDoxNzUwMDE5ODY=', 'title': 'Python Script'}]}\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "2023-11-14 16:11:57.487 | WARNING  | poe_api_wrapper.api:on_ws_close:302 - Connection to remote host was lost. Reconnecting...\n",
      "2023-11-14 16:12:20.451 | WARNING  | poe_api_wrapper.api:on_ws_close:302 - Connection to remote host was lost. Reconnecting...\n",
      "2023-11-14 16:12:42.025 | WARNING  | poe_api_wrapper.api:on_ws_close:302 - Connection to remote host was lost. Reconnecting...\n",
      "2023-11-14 16:13:15.303 | WARNING  | poe_api_wrapper.api:on_ws_close:302 - Connection to remote host was lost. Reconnecting...\n",
      "2023-11-14 16:13:31.366 | WARNING  | poe_api_wrapper.api:on_ws_close:302 - Connection to remote host was lost. Reconnecting...\n",
      "2023-11-14 16:13:45.016 | WARNING  | poe_api_wrapper.api:on_ws_close:302 - Connection to remote host was lost. Reconnecting...\n",
      "2023-11-14 16:14:13.714 | WARNING  | poe_api_wrapper.api:on_ws_close:302 - Connection to remote host was lost. Reconnecting...\n",
      "2023-11-14 16:14:27.521 | WARNING  | poe_api_wrapper.api:on_ws_close:302 - Connection to remote host was lost. Reconnecting...\n",
      "2023-11-14 16:15:08.973 | WARNING  | poe_api_wrapper.api:on_ws_close:302 - Connection to remote host was lost. Reconnecting...\n",
      "2023-11-14 16:15:45.985 | WARNING  | poe_api_wrapper.api:on_ws_close:302 - Connection to remote host was lost. Reconnecting...\n",
      "2023-11-14 16:19:36.776 | WARNING  | poe_api_wrapper.api:on_ws_close:302 - Connection to remote host was lost. Reconnecting...\n",
      "2023-11-14 16:20:08.006 | WARNING  | poe_api_wrapper.api:on_ws_close:302 - Connection to remote host was lost. Reconnecting...\n"
     ]
    },
    {
     "ename": "",
     "evalue": "",
     "output_type": "error",
     "traceback": [
      "\u001b[1;31mThe Kernel crashed while executing code in the the current cell or a previous cell. Please review the code in the cell(s) to identify a possible cause of the failure. Click <a href='https://aka.ms/vscodeJupyterKernelCrash'>here</a> for more info. View Jupyter <a href='command:jupyter.viewOutput'>log</a> for further details."
     ]
    }
   ],
   "source": [
    "print(client.get_chat_history()['data'])"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "franka",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.9.17"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
